<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Template Units For Numerical Applications</title>
<link href="TUNAstyles.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<style type="text/css">

.cabeza_cell {
  border-left: 1px solid #000000;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  border-top: 1px solid #000000;
  font-family: Arial,Helvetica,sans-serif;
  font-size: 11pt;
  background-color: #ffffff;
  font-weight: lighter;
  color: #000000;
  text-decoration: none;
}
</style>

</head><body>
<div>
<table align="center" width="640" border="0" cellspacing="2" cellpadding="5" class="border">
<tr>
 <td class="cabeza_cell"> 

  <font style="font-family: helvetica; color: #000000;" size=4>
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>TUNA</font> :
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>T</font>emplate
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>U</font>nits for
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>N</font>umerical 
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>A</font>pplications
 </font><br>
  
</td>
</tr>

<tr>
<td class="cabeza_cell">
 <span style="font-family: helvetica; color: #336699;">
 Documentation Ver 1.0.0 August 2011 by
 <a href="http://mmc.geofisica.unam.mx/luiggi">Luis M. de la Cruz</a> <br>
 <a href="http://mmc.geofisica.unam.mx"> GMMC </a> -
 <a href="http://www.geofisica.unam.mx/recnat/"> Depto. de Recursos Naturales </a> -
 <a href="http://www.geofisica.unam.mx"> Instituto de Geof&iacute;sica </a> -
 <a href="http://www.unam.mx"> UNAM </a><br>
 </span>
 </td>

</tr>

</table>
</div>
<br>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">Tuna/include/Tuna.hpp</div>  </div>
</div>
<div class="contents">
<a href="Tuna_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment"> *  Copyright (C) 2011  Luis M. de la Cruz</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> *  This file is part of TUNA</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> *  TUNA is free software: you can redistribute it and/or modify</span>
<a name="l00007"></a>00007 <span class="comment"> *  it under the terms of the GNU General Public License as published by</span>
<a name="l00008"></a>00008 <span class="comment"> *  the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00009"></a>00009 <span class="comment"> *  (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> *  TUNA is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment"> *  but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment"> *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00014"></a>00014 <span class="comment"> *  GNU General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> *  You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> *  along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00018"></a>00018 <span class="comment"> ------------------------------------------------------------------------*/</span>
<a name="l00019"></a>00019 
<a name="l00033"></a>00033 <span class="preprocessor">#ifndef _TUNA_H_</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define _TUNA_H_</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;ctime&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;cmath&gt;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;blitz/array.h&gt;</span>
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 <span class="keyword">using namespace </span>blitz;
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">namespace </span>Tuna {
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="keywordtype">int</span> BANDERA;
<a name="l00046"></a>00046   
<a name="l00047"></a>00047 <span class="keyword">const</span> <span class="keywordtype">double</span> PI = 4 * atan(1.0);
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
<a name="l00050"></a>00050 <span class="keyword">struct </span>Typeinfo { };
<a name="l00051"></a>00051 
<a name="l00059"></a>00059 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tprec, <span class="keywordtype">int</span> Dim&gt;
<a name="l00060"></a><a class="code" href="structTuna_1_1TunaArray.html">00060</a> <span class="keyword">struct </span><a class="code" href="structTuna_1_1TunaArray.html" title="tiny used mainly for extents and deltas of meshes (blitz-TinyVector based) and huge used for general ...">TunaArray</a> 
<a name="l00061"></a>00061 { 
<a name="l00067"></a><a class="code" href="structTuna_1_1TunaArray.html#a856185d6b5c78c1eb2b0253f07bf29ed">00067</a>   <span class="keyword">typedef</span> TinyVector&lt;Tprec, Dim&gt; <a class="code" href="structTuna_1_1TunaArray.html#a856185d6b5c78c1eb2b0253f07bf29ed" title="Definition of very small arrays.">tiny</a>;
<a name="l00068"></a>00068 
<a name="l00074"></a><a class="code" href="structTuna_1_1TunaArray.html#af3bcab5018eec3d7697c9fb03ad89157">00074</a>   <span class="keyword">typedef</span> Array&lt;Tprec, Dim&gt; <a class="code" href="structTuna_1_1TunaArray.html#af3bcab5018eec3d7697c9fb03ad89157" title="Definition of big arrays to store scalar fields on meshes.">huge</a>;
<a name="l00075"></a>00075 };
<a name="l00076"></a>00076 
<a name="l00080"></a>00080 <span class="keyword">enum</span> Axis_t { X = 0, Y = 1, Z = 2 };
<a name="l00081"></a>00081 
<a name="l00086"></a>00086 <span class="keyword">enum</span> BC_t { TOP_WALL  , BOTTOM_WALL,
<a name="l00087"></a>00087             LEFT_WALL , RIGHT_WALL,
<a name="l00088"></a>00088             FRONT_WALL, BACK_WALL };
<a name="l00089"></a>00089 
<a name="l00093"></a>00093 <span class="keyword">enum</span> Norm { L1, L2, Lmax };
<a name="l00094"></a>00094   
<a name="l00095"></a>00095   
<a name="l00099"></a><a class="code" href="structTuna_1_1timer.html">00099</a>   <span class="keyword">struct </span><a class="code" href="structTuna_1_1timer.html" title="Struct useful to measure the elapsed time.">timer</a>
<a name="l00100"></a>00100   {
<a name="l00101"></a>00101 
<a name="l00103"></a><a class="code" href="structTuna_1_1timer.html#a5b0cf85d5db9b941e13ce7c79d7de7b0">00103</a>     <span class="keywordtype">void</span> tic() 
<a name="l00104"></a>00104     { _time = std::clock(); } 
<a name="l00105"></a>00105      
<a name="l00107"></a><a class="code" href="structTuna_1_1timer.html#a3796592dd5b589521e1093d9225eee5e">00107</a>     <span class="keywordtype">double</span> toc()<span class="keyword"> const </span>
<a name="l00108"></a>00108 <span class="keyword">    </span>{ <span class="keywordflow">return</span> double(std::clock() - _time)/CLOCKS_PER_SEC; }
<a name="l00109"></a>00109 
<a name="l00110"></a>00110     std::clock_t _time;
<a name="l00111"></a>00111   };
<a name="l00112"></a>00112 
<a name="l00116"></a>00116   <span class="keyword">enum</span> cartDir_t { RIGHT = 0, LEFT = 1, 
<a name="l00117"></a>00117                    UP = 2, DOWN = 3, 
<a name="l00118"></a>00118                    FRONT = 4, BACK = 5 }; <span class="comment">// Neighbors in Cart</span>
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 
<a name="l00121"></a>00121 } <span class="comment">// namespace Tuna</span>
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 <span class="preprocessor">#endif //_TUNA_H_</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span>
<a name="l00125"></a>00125 
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr size="1">
<div align="center">
Last modification: Sun Aug 28 09:57:21 CDT 2011
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&copy; 2011 LMCS-UNAM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Generated by <a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="top" border="0" height="25"></a> 1.6.1 </div>

